
Last chance! 50% off unlimited learning
Sale ends in
Cross validation for the
akernreg.tune(y, x, a = seq(0.1, 1, by = 0.1), h = seq(0.1, 1, length = 10),
type = "gauss", nfolds = 10, folds = NULL, seed = NULL)
A matrix with the compositional response data. Zeros are allowed.
A matrix with the available predictor variables.
A vector with a grid of values of the power transformation, it has to be between -1 and 1. If zero values are present it has to be greater than 0. If
A vector with the bandwidth value(s) to consider.
The type of kernel to use, "gauss" or "laplace".
The number of folds. Set to 10 by default.
If you have the list with the folds supply it here. You can also leave it NULL and it will create folds.
You can specify your own seed number here or leave it NULL.
A list including:
The Kullback-Leibler divergence for all combinations of
The Jensen-Shannon divergence for all combinations of
The minimum Kullback-Leibler divergence.
The minimum Jensen-Shannon divergence.
The optimal
The optimal
The optimal
The optimal
The runtime of the cross-validation procedure.
A k-fold cross validation for the
Michail Tsagris, Abdulaziz Alenazi and Connie Stewart (2021). Non-parametric regression models for compositional data. https://arxiv.org/pdf/2002.05137.pdf
akern.reg, aknnreg.tune, aknn.reg, alfa.rda, alfa.fda, rda.tune
# NOT RUN {
y <- as.matrix( iris[, 1:3] )
y <- y / rowSums(y)
x <- iris[, 4]
mod <- akernreg.tune(y, x, a = c(0.4, 0.6), h = c(0.1, 0.2), nfolds = 5)
# }
Run the code above in your browser using DataLab